from django.http import HttpResponse, JsonResponse
from django.shortcuts import render

# Create your views here.
from app.models import PersonInfo


def index1(request):
    return render(request, 'index1.html')


def dosearch(request):
    # n = request.POST.get('name')
    #
    # p = PersonInfo.objects.get(name=n)
    #
    # content = {
    #     'name': p.name,
    #     'age': p.age,
    # }

    content = {
        'name': 'li4',
        'age': 24,
    }


    ret = JsonResponse(content)

    return HttpResponse(ret)

    # return render(request, 'index1.html', contenx)
